<!-- 超级银行家用户管理页面 -->
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li><a>主页</a></li>
            <li><a>会员管理</a></li>
            <li class="active"><strong>会员查询</strong></li>
        </ol>
    </div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app ng-controller="leaguerQueryCtrl">
    <form class="form-horizontal" id="form1">
        <div class="row">
            <div class="col-lg-12">
                <div class="">
                    <div class="panel-body ibox float-e-margins">
                        <div class="ibox-content">
                            <div class="ibox-title">
                                <h5>会员查询条件</h5>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">会员编号:</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="info.leaguerNo">
                                </div>
                                <label class="col-sm-2 control-label">手机号:</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="info.mobilePhone">
                                </div>
                                <label class="col-sm-2 control-label">会员名称:</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="info.leaguerName">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">用户编号:</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="info.originUserNo">
                                </div>
                                <label class="col-sm-2 control-label">M等级:</label>
                                <div class="col-sm-2">
                                    <select class="form-control" ng-model="info.mLevel" ng-options="x.value as x.text for x in levelSelect"/>
                                </div>
                                <label class="col-sm-2 control-label">会员等级:</label>
                                <div class="col-sm-2">
                                    <select class="form-control" ng-model="info.growUpLevel" ng-options="x.value as x.text for x in levelSelect"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">业务组:</label>
                                <div class="col-sm-2">
                                    <select class="form-control" ng-model="info.businessNo" ng-options="x.value as x.text for x in businessNoList"/>
                                </div>
                                <label class="col-sm-2 control-label">会员时间:</label>
                                <div class="col-sm-5">
                                    <input id="d5255" class="form-control" type="datetime" ng-model="info.growDateBegin" onchange=""  style="width:auto;display:inline-block;"
                                           onFocus="var d5256=$dp.$('d5256');WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd',onpicked:function(){d5256.focus();},maxDate:'#F{$dp.$D(\'d5256\')}'})"/>
                                    ~
                                    <input id="d5256" class="form-control" type="datetime"  ng-model="info.growDateEnd" onchange=""  style="width:auto;display:inline-block;"
                                           onFocus="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd',minDate:'#F{$dp.$D(\'d5255\')}'})"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">创建时间:</label>
                                <div class="col-sm-5">
                                    <input id="d5231" class="form-control" type="datetime" ng-model="info.createTimeBegin" onchange=""  style="width:auto;display:inline-block;"
                                           onFocus="var d5232=$dp.$('d5232');WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:function(){d5232.focus();},maxDate:'#F{$dp.$D(\'d5232\')}'})"/>
                                    ~
                                    <input id="d5232" class="form-control" type="datetime"  ng-model="info.createTimeEnd" onchange=""  style="width:auto;display:inline-block;"
                                           onFocus="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'d5231\')}'})"/>
                                </div>
                            </div>
                            <div class="form-group" style="margin-top: 30px">
                                <div class="col-sm-8">
                                    <label class="col-sm-2 control-label"></label>
                                    <button class="btn btn-primary6 btn-mr20" type="button" ng-click="query(1)" >查询</button>
                                    <button class="btn btn-primary3 btn-mr20" type="button" ng-click="clear()" >清空</button>
                                    <button class="btn btn-primary7 btn-mr20" type="button" ng-show="hasPermit('leaguerAction.importDetail')" ng-click="exportInfo()" >导出</button>
                                    <button class="btn btn-new btn-mr20" type="button" ng-show="hasPermit('leaguerAction.importDiscount')" ng-click="importDiscountShow()" >会员同步</button>

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body ibox float-e-margins">
                        <div class="ibox-content">
                            <div class="ibox-title">
                                <h5>会员列表</h5>
                            </div>
                            <div class="form-group">
                                <div class="gridStyle" ui-grid="userGrid" ui-grid-selection ui-grid-pagination
                                     ui-grid-resize-columns ui-grid-pinning></div>
                                <div ng-show="loadImg" class="timg"></div>
                            </div>
                        </div>
                        <div style="height:30px"></div>
                    </div>
                </div>
            </div>
        </div>
    </form>

    <div id="addInfoModal" class="modal fade form-horizontal" tabindex="4" role="dialog">
        <div class="modal-dialog" style="height:450px;width:900px">
            <div class="modal-content" >
                <form class="form-horizontal" name="horizontalCard" novalidate>
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h3 class="modal-title">新增业务组</h3>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>业务组:</label>
                            <div class="col-sm-3">
                                <select class="form-control" ng-model="addInfo.businessNo" name="businessNo" required ng-options="x.value as x.text for x in businessList" />
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <div class="form-group control-label">
                            <label class="col-sm-1 control-label"></label>
                            <div class="col-sm-6">
                                <button class="btn btn-primary btn-mr20" ng-disabled="horizontalCard.$invalid || submitting" type="button" ng-click='addInfoSubmit()' >确定</button>
                                <button class="btn btn-primary4" type="button" ng-click='hideModal()'>返回</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <form class="form-horizontal" id="form2" name="horizontalAdd" novalidate>
        <div id="importDiscount" class="modal fade" tabindex="-1" role="dialog">
            <div class="modal-dialog" style="width: 900px">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h3 class="modal-title">会员同步</h3>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">业务组:</label>
                            <div class="col-sm-2">
                                <select class="form-control" ng-model="addInfo.businessNo" required ng-options="x.value as x.text for x in businessNoList"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">导入文件:</label>
                            <div class="col-sm-3 checkbox ">
                                <input type="file" nv-file-select="" ng-model="fileSelect" uploader="uploader" multiple/>
                                <table class="table">
                                    <tbody>
                                    <tr ng-repeat="item in uploader.queue">
                                        <td>
                                            <strong>{{ item.file.name }}</strong>
                                        </td>
                                        <td nowrap>
                                            <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                                                <span class="glyphicon glyphicon-trash"></span>删除
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-3 checkbox ">
                                <a href="leaguerAction/downloadTemplate" >会员同步模板下载</a>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-6">
                                <button class="btn btn-primary btn-mr20" type="button" ng-click='importDiscount()'
                                        id="btnSubmit" ng-disabled="uploader.queue.length==0||horizontalAdd.$invalid||importSta">提交</button>
                                <button class="btn btn-primary8" type="button" ng-click='importDiscountHide()'
                                >取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>